﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ApaterPattern
{
    class Program
    {
        static void Main(string[] args)
        {

            Animal.MallardDuck duck = new Animal.MallardDuck();
            Animal.WildTurkey turkey = new Animal.WildTurkey();
            Interface.IDuck turkeyAdapter = new Adapter.TurkeyAdapter(turkey);

            Console.WriteLine("the turkey says...");
            turkey.Gobble();
            turkey.Fly();

            Console.WriteLine("\r\nthe duck says...");
            testDuck(duck);

            Console.WriteLine("\r\nthe turkeyAdapter says...");
            testDuck(turkeyAdapter);

            Console.ReadKey();
        }

        static void testDuck(Interface.IDuck duck)
        {
            duck.Quack();
            duck.Fly();
        }
    }
}
